package com.foreknow.springboot_demo.threaddemo;

public class MyThread extends Thread{

    @Override
    public void run() {
        for (int i=0; i<100;i++){
            System.out.println("子线程运行了"+i);
        }
    }

    public static void main(String[] args) {
        MyThread myThread = new MyThread();
        myThread.start(); //启动线程
        for (int i=0; i<100;i++){
            System.out.println("主线程线程运行了"+i);
        }
    }
}
